<template>
<!--webview.wxml-->
<web-view :src="webUrl"></web-view>
</template>

<script>
var app = getApp();
var request = app.globalData.request;
var setting = app.globalData.setting;
var util = require("../../../utils/util.js");
var common = require("../../../utils/common.js");

export default {
  data() {
    return {
      webUrl: ''
    };
  },

  components: {},
  props: {},
  onLoad: function (options) {
    var pages = getCurrentPages();
    var prevPage = pages[pages.length - 2]; //上一个页面

    var url = prevPage.data.webUrl; //取上页data里的数据

    url = request.modifyUrl(url) + '&is_json=0'; // 是html页面，不要json格式返回
    //处理webview业务域名需要添加https

    url = common.checkRequestIsHttps(url);
    console.log(url);
    this.setData({
      webUrl: url + '#wechat_redirect'
    });
    app.globalData.showLoading(null, 1500);
  },
  methods: {}
};
</script>
<style>
/* webview.wxss */
</style>